package com.auto.survey.util.monitoring.entity

import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.Index
import androidx.room.PrimaryKey

@Entity(
    tableName = "NonCompliantPoint",
    foreignKeys = [
        ForeignKey(
            entity = RearIntersectionCalculationResult::class,
            parentColumns = ["id"],
            childColumns = ["calculationResultId"],
            onDelete = ForeignKey.Companion.CASCADE
        )
    ],
    indices = [Index("calculationResultId")]
)
data class NonCompliantPoint(
    @PrimaryKey(autoGenerate = true) val id: Int = 0,
    var calculationResultId: Int = -1, // 关联到主结果的ID
    var pointName: String         // 存储具体的字符串值（如控制点名称）
)